<?php
namespace app\index\model;
use think\Model;

class RoomUser extends Model
{
    
    public function getOne ($where) {
        $res = $this->where($where)->find();
        if($res) {
            return $res->toArray();
        }
        return false;
    }
    
    public function getList ($where) {
        $res = $this->where($where)->select();
        if($res) {
            return $res->toArray();
        }
        return false;
    }
    
    public function getCount($where) {
        return $this->where($where)->count();
    }


    public function getUserListByRoomid ($roomid) {
        return $this->where('room_id',$roomid)->select()->toArray();
    }

   
}
